﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Problema2
{
    class ServerComputer  : Computer
    {
        public ServerComputer() 
        {
            tip = "server";

            factory = new ConcreteFactoryComputerPartCPU();
            cpu = (ConcreteComputerPartCPU)factory.CreateComputerPart();

            factory = new ConcreteFactoryComputerPartRAM();
            ram = (ConcreteComputerPartRAM)factory.CreateComputerPart();

            factory = new ConcreteFactoryComputerPartMonitor();
            monitor = (ConcreteComputerPartMonitor)factory.CreateComputerPart();
        }
        public ServerComputer(ConcreteComputerPartCPU t, ConcreteComputerPartRAM t1, ConcreteComputerPartMonitor t2)
        {
            cpu = new ConcreteComputerPartCPU(t);
            ram = new ConcreteComputerPartRAM(t1);
            monitor = new ConcreteComputerPartMonitor(t2);
        }
    }
}
